#include<iostream>
#include<string>
using namespace std;
int main()
{
    string sd,se,sa;
    int a[100001]{0},b[100001]{0},c[100001]{0},mc,me,mz,n,mo=0;
    cin>>sd>>se;
    mc=sd.size();
    me=se.size();
    if(mc<me||mc==me&&sd<se){sa=sd;sd=se;se=sa;n=mc;mc=me;me=n;mo=-1;} 
    for(int i=1;i<=mc;i++) a[i]=sd[mc-i]-'0';
    for(int i=1;i<=me;i++) b[i]=se[me-i]-'0';
    int i=1,o=0;
    while(i<=mc||i<=me)
    {
        if(a[i]<b[i]){a[i+1]--;a[i]+=10;}
        c[i]=a[i]-b[i];
        i++;
    }
    mz=i;while(c[mz]==0&&mz>1)mz--;
    if(mo==-1) cout<<"-";
    for(int i=mz;i>=1;i--)
	{
		cout<<c[i];
	}
	return 0;
}
